<?php
/**
 * | ---------------------------------------------------------------------------------------------------
 * | Author：johnxu <fsyzxz@163.com>.
 * | ---------------------------------------------------------------------------------------------------
 * | Home: https://www.johnxu.net.
 * | ---------------------------------------------------------------------------------------------------
 * | Data: 2019/1/3
 * | ---------------------------------------------------------------------------------------------------
 * | Desc: swoole异步任务队列
 * | ---------------------------------------------------------------------------------------------------
 */

namespace app\common\task;

use app\common\libs\Redis;

class Task
{

    /**
     * 发送短信的任务
     *
     * @param $data
     *
     * @return bool
     */
    public function sendSms( $data )
    {
        // TODO: 需要自行写发送短信的逻辑，返回一个状态
        Redis::getInstance()->setSms( $data['phone'], $data['code'] );

        return true;
    }
}
